home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET
/
BCI NET Dec 94.iso
/
archives
/
telecomm
/
bbs
/
tbbs093.lha
/
Menu
/
MsgMenu.dat
< prev
next >
Wrap
Text File
|
1994-02-24
|
8KB
|
233 lines
/* Message Menu */
MenuName "Messages"
MenuText "Text/MessageMenu"
Prompt "(\(GetTimeLeft())) \(27)[36m\(GetMsgAreaName(GetMsgArea())): \(27)[0m"
Unknown "\(27)[36mInvalid command: \(27)[0m'%s'"
Command "?" {
rexx("SendASCII Text/MessageMenu.txt");
};
Command "post" (N:1) {
rexx("LogEntry Posting message to \(GetMsgAreaName(GetMsgArea()))");
rexx("WriteMsg");
};
Command "next" (N:1) {
rexx("LogEntry Reading messages");
rexx("ReadNext");
};
Command "" {
rexx("LogEntry Reading messages");
rexx("ReadNext");
};
Command "area" (N:1) {
if(arg(1) == "") rexx("SelectSIGArea");
else rexx("SelectSIGArea \(arg(1))");
};
Command "read" (N:1) {
if(arg(1) == "") $from = AskInput("\(27)[32mStart reading from: \(27)[0m", GetHighRead(GetMsgArea()), 10, "NUMERIC");
else $from = arg(1);
rexx("LogEntry Reading messages");
rexx("ReadFrom \($from)");
};
Command "find" (N:1) {
$start = GetLowMsg(GetMsgArea());
$end = GetHighMsg(GetMsgArea());
if(arg(1) == "") $str = AskInput("\(27)[32mEnter search string: \(27)[0m", "", 255);
else {
$usage = 0;
$str = arg(1);
$an = 2;
while(str(arg($an), 1, 1) == "-") {
$id = lower(str(arg($an), 2, 1));
if($id == "n") $start = GetHighRead(GetMsgArea()) + 1;
else if($id == "s") $start = str(arg($an), 3, len(arg($an)) - 2);
else if($id == "e") $end = str(arg($an), 3, len(arg($an)) - 2);
else {
$usage = 1;
rexx("SendModem \(27)[33mUsage: \(27)[0mf\(27)[36mind [<string> [-(n|s#|e#)]]\(13)\(10)\(27)[0m");
break;
}
$an = $an + 1;
}
if($usage) break;
}
if($str != "") {
$str = SearchMessages($start, $end, $str);
if($str != "") {
if(GetYesNo("\(13)\(10)\(27)[32mWould you like these messages marked? \(27)[0m", 1, 1)) {
while($str != "") {
$ln = split($str, " ");
rexx("MarkMsg \(GetMsgArea()) \(str($str, 1, $ln))");
$str = str($str, $ln + 1, len($str) - ($ln + 1));
}
}
rexx("SendModem \(13)\(10)");
}
} else rexx("SendModem \(13)\(10)\(27)[31mOperation cancelled\(13)\(10)\(27)[0m");
};
Command "list" (N:1) {
$start = GetLowMsg(GetMsgArea());
$end = GetHighMsg(GetMsgArea());
if(arg(1) != "") {
$usage = 0;
$an = 1;
while(str(arg($an), 1, 1) == "-") {
$id = lower(str(arg($an), 2, 1));
if($id == "n") $start = GetHighRead(GetMsgArea()) + 1;
else if($id == "s") $start = str(arg($an), 3, len(arg($an)) - 2);
else if($id == "e") $end = str(arg($an), 3, len(arg($an)) - 2);
else {
$usage = 1;
rexx("SendModem \(27)[33mUsage: \(27)[0ml\(27)[36mist [-(n|s#|e#)]\(13)\(10)\(27)[0m");
break;
}
$an = $an + 1;
}
if($usage) break;
}
rexx("ListMessages \($start) \($end)");
};
Command "highread" (N:1) {
$area = GetMsgArea();
$val = "";
$an = 1;
while(arg($an) != "") {
if(lower(str(arg($an), 1, 2)) == "-a") $area = str(arg($an), 3, len(arg($an)) - 2);
else $val = arg($an);
$an = $an + 1;
}
if($val == "") $val = AskInput("\(27)[32mEnter high read for area #\($area): \(27)[0m", GetHighRead($area), 10, "NUMERIC");
if($val != "") rexx("SetHighRead \($area) \($val)");
};
Command "mark" (N:1) {
if(arg(1) != "") {
$start = 0;
$end = GetHighMsg(GetMsgArea());
$an = 1;
$usage = 0;
while(str(arg($an), 1, 1) == "-") {
$id = lower(str(arg($an), 2, 1));
if($id == "s") $start = str(arg($an), 3, len(arg($an)) - 2);
else if($id == "e") $end = str(arg($an), 3, len(arg($an)) - 2);
else if($id == "n") $start = GetHighRead(GetMsgArea());
else {
$usage = 1;
rexx("SendModem \(27)[33mUsage: \(27)[0mm\(27)[36mark [-(s#|e#|n)] [#] ...\(13)\(10)\(27)[0m");
break;
}
$an = $an + 1;
}
if($usage) break;
if($start) {
$msg = $start;
while($msg <= $end) {
rexx("MarkMsg \(GetMsgArea()) \($msg)");
$msg = $msg + 1;
}
}
while(arg($an) != "") {
rexx("MarkMsg \(GetMsgArea()) \(arg($an))");
$an = $an + 1;
}
} else rexx("MarkMsg \(GetMsgArea()) \(AskInput("\(27)[32mEnter message # to mark: \(27)[0m", "", 10, "NUMERIC"))");
};
Command "rmarked" (N:2) {
rexx("LogEntry Reading marked messages");
rexx("ReadMarked");
};
Command "join" (N:1) {
rexx("LogEntry Joining message areas");
if(arg(1) != "") {
if(lower(str(arg(1), 1, 2)) == "-a") {
$area = 1;
while($area <= Con_MsgAreas()) {
if(GetAreaMode($area)) rexx("SendModem \(27)[31mYou are already a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
else {
rexx("SetAreaMode \($area) 1");
if(GetAreaMode($area)) rexx("SendModem \(27)[36mYou are now a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
}
$area = $area + 1;
}
} else {
$an = 1;
while(arg($an) != "") {
$area = SIGtoReal(arg($an));
if($area > Con_MsgAreas()) rexx("SendModem \(27)[31mArea number out of range: \(27)[0m\($area)\(13)\(10)");
else {
if(GetAreaMode($area)) rexx("SendModem \(27)[31mYou are already a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
else {
rexx("SetAreaMode \($area) 1");
if(GetAreaMode($area)) rexx("SendModem \(27)[36mYou are now a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
}
}
$an = $an + 1;
}
}
} else {
$area = GetMsgArea();
if(GetAreaMode($area)) rexx("SendModem \(27)[31mYou are already a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
else {
rexx("SetAreaMode \($area) 1");
if(GetAreaMode($area)) rexx("SendModem \(27)[36mYou are now a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
}
}
};
Command "drop" (N:2) {
rexx("LogEntry Unjoining message areas");
if(arg(1) != "") {
if(lower(str(arg(1), 1, 2)) == "-a") {
$area = 1;
while($area <= Con_MsgAreas()) {
if(GetAreaMode($area)) {
rexx("SetAreaMode \($area) 0");
rexx("SendModem \(27)[36mYou are no longer a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
}
$area = $area + 1;
}
} else {
$an = 1;
while(arg($an) != "") {
$area = SIGtoReal(arg($an));
if($area > Con_MsgAreas()) rexx("SendModem \(27)[31mArea number out of range: \(27)[0m\($area)\(13)\(10)");
else {
if(GetAreaMode($area)) {
rexx("SetAreaMode \($area) 0");
rexx("SendModem \(27)[36mYou are no longer a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
}
}
$an = $an + 1;
}
}
} else {
$area = GetMsgArea();
if(GetAreaMode($area)) {
rexx("SetAreaMode \($area) 0");
rexx("SendModem \(27)[36mYou are no longer a member of \(27)[0m(\($area)) \(27)[35m\(GetMsgAreaName($area))\(27)[0m\(13)\(10)");
}
}
};
Command "quit" (N:1) {
menu("MainMenu.menu");
};
Command "move" {
if(GetMask() & 0xffffffff) rexx("MoveMsg \(arg(1)) \(arg(2))");
};